package com.my.kq.service;

import com.my.kq.dao.PositionDao;
import com.my.kq.entity.Position;

import java.util.List;

public class PositionService {
    private PositionDao positionDao=new PositionDao();

    public Position select(Integer number) throws Exception {
        Position posi= positionDao.posiselect(number);
        return posi;
    }

    public void posixg(String educationc,Integer id) throws Exception {
        positionDao.posixg(educationc,id);
    }

    public List<Position> getPage(int pageNo)throws Exception{
        List<Position> page = positionDao.getPage(pageNo);
        return page;
    }

    public int getCount()throws Exception{
        int count = positionDao.getCount();
        return count;
    }

    public Position getPosition(int id)throws Exception{
        Position position = positionDao.getPosition(id);
        return position;
    }

    public void updatePosition(Position position)throws Exception{
        positionDao.updatePosition(position);
    }

    public void deletePosition(int id)throws Exception{
        positionDao.deletePosition(id);
    }

    public void addPosition(Position position)throws Exception{
        positionDao.addPosition(position);
    }

    public List<Position> getAllPosition()throws Exception{
        List<Position> list = positionDao.getAllPosition();
        return list;
    }
}
